<% if flash[:alert] %>
  <div style="color: red"><%= flash[:alert] %></div>
<% end %>

<%= form_tag login_path do %>
    <% if local_assigns.include?(:redirect) %>
      <%= hidden_field_tag :redirect, redirect %>
    <% end %>
    <%= label_tag :email %>
    <br>
    <%= text_field_tag :email, params[:email] %>
    <br>
    <%= label_tag :password %>
    <br>
    <%= password_field_tag :password %>
    <br>
    <%= submit_tag "Log In" %>
<% end %>
